<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style type="text/css">
        .pagination{margin-top:20px;margin-bottom: 20px;}
        .pagination li{margin:0px 10px; border:1px solid #e6e6e6;padding: 3px 8px;display: inline-block;}
        .pagination .active{background-color: #dd1a20;color: #fff;}
        .pagination .disabled{color:#aaa;}
        .pagination a{text-decoration-line: none;}
        .a{text-decoration-line: none}
        *{margin: 5px 5px;}
    </style>
    <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
</head>
<body>
    <button onclick="href()">添加</button>
    <table border="1" cellspacing="0" cellpadding="0" width="500px" height="250px">
        <tr align="center">
            <th>ID</th>
            <th>学校名称</th>
            <th>所在地区</th>
            <th>操作</th>
        </tr>
        {foreach name="data" item="v"}
        <tr align="center">
            <td>{$v.id}</td>
            <td>{$v.school_name}</td>
            <td>{$v.city}</td>
            <td>
                <a href="{:url('school/edit')}?id={$v.id}"><button>修改</button></a>
                <a href="{:url('school/del')}?id={$v.id}"><button>删除</button></a>
            </td>

        </tr>
        {/foreach}
    </table>
    {$page}
    <script>
        function href(){
            window.location.href="{:url('school/add')}";
        }
    </script>

</body>

</html>